﻿CREATE PROCEDURE [dbo].[yaf_active_listforum](
                @ForumID INT)
AS
    BEGIN
        SELECT   UserID = a.UserID,
                 UserName = b.Name
        FROM     yaf_Active a
                 JOIN yaf_User b
                   ON b.UserID = a.UserID
        WHERE    a.ForumID = @ForumID
        GROUP BY a.UserID,b.Name
        ORDER BY b.Name
    END


